package com.test.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Administrator on 2016/3/2.
 */
@RestController
public class FirstController {
    @RequestMapping("/test")
    public String test() {
        return "https hello";
    }

    @RequestMapping("/conn")
    public String conn() {
        RestTemplate restTemplate = new RestTemplate();
        String result = restTemplate.getForObject("https://www.itjoyee.com:8443/test", String.class);
        return result;
    }
}
